1. Field of the Invention
The present invention relates to control of servomotors, and more particularly, to a control system for controlling servomotors driven by a plurality of daisy-chain-connected servo amplifiers and a numerical controller.
2. Description of the Related Art
FIG. 5 shows an example of a system configuration for controlling conventional servomotors. In FIG. 5, servomotors 41, 42, 43, 61, 62 and 63 are driven by servo amplifiers 31, 32, 33, 51, 52 and 53, respectively.
The servo amplifiers 31 to 33 and servo amplifiers 51 to 53 are daisy-chain-connected to a numerical controller 11 by optical cables. Thus, the numerical controller 11 is provided with a plurality of optical connectors (connectors #1 and #2 in FIG. 5) for communication. The number of connectable servo amplifier is increased by controlling a plurality of serial buses (two buses in FIG. 5). These serial buses constitute a plurality of communication lines (communication lines #1 and #2 in FIG. 5).
Data for the servo amplifiers, such as current commands and the like for driving the motors, are transmitted from the numerical controller 11 to the first servo amplifier 31 (or 51) through a serial bus. On receiving the data from the numerical controller 11, the first servo amplifier 31 (or 51) captures its necessary data among the received data and transfers data for the other servo amplifiers 32 and 33 (or 52 and 53) to the daisy-chain-connected second servo amplifier 32 (or 52) on its downstream side through another serial bus.
Likewise, the second servo amplifier 32 (or 52) captures its necessary data and transfers data for the third servo amplifier 33 (or 53) to the amplifier 33 (or 53) on its downstream side through still another serial bus.
Although the three servo amplifiers are daisy-chain-connected in the example shown in FIG. 5, more servo amplifiers may be connected. The third and subsequent servo amplifiers also capture their necessary data and transfer data for the other servo amplifiers to the additional amplifiers on their downstream side through additional serial buses. This delivery of the data enables data transmission from the numerical controller 11 to all the daisy-chain-connected servo amplifiers.
On the other hand, data such as feedback signals from the servo amplifiers 41 to 43 (or 61 to 63) are transmitted from the daisy-chain-connected servo amplifiers 31 to 33 (or 51 to 53) to the numerical controller 11. The servo amplifiers 32 and 33 (or 52 and 53) transmit the feedback signals or other data for the numerical controller 11 to the servo amplifiers 31 and 32 (or 51 and 52) that are connected to the upstream side of the serial buses.
The upstream-side servo amplifiers transmit the received data, along with their own data precedent thereto, to the servo amplifiers on their upstream side. As all the servo amplifiers transmit and receive data in like manner, the data from all the servo amplifiers are transmitted to the numerical controller 11.
If a communication line between the numerical controller 11 and the first servo amplifier 31 (or 51) or a line between any two adjacent servo amplifiers undergoes any trouble or if any servo amplifier suffers a failure, the daisy-chain-connected serial buses are disabled from communication. If the serial buses suffer any communication failure, current commands from the numerical controller fail to reach the servo amplifiers on the downstream side of the communication line or the servo amplifier in trouble. If the current commands from the numerical controller cease to reach the servo amplifiers in this manner, the motors are rendered uncontrollable and can possibly run recklessly.
Therefore, the servo amplifiers are expected to continually monitor the communication lines and reduce power outputs to the motors to prevent them from running recklessly if any abnormality is detected on the communication lines. If no external force is applied, as in the case of a gravity axis, the motors cannot be stopped by external force by only reducing the outputs to the motors to 0, so that the motors must be braked simultaneously.
Also if the numerical controller undergoes any failure and stops communication, on the other hand, all the servo amplifiers that are connected to the stopped communication lines must detect the communication failure and reduce the power outputs to the motors to 0, thereby preventing the motors from running recklessly.
FIG. 6 is a schematic diagram for illustrating a system configuration of the numerical controller. The numerical controller 11 is mounted with a CPU 12, DRAM 21, SRAM 22, flash memory 23, DSP 25, common RAM 24, serial communication LSI 13 for serial communication with the servo amplifiers, and optical modules 14A and 14B.
The CPU 12 can access the DRAM 21, SRAM 22, flash memory 23, and common RAM 24 through serial buses 20. Normally, the common RAM 24 is formed of an SRAM, and data is transferred between the CPU 12 and the DSP 25 via the common RAM 24. When the CPU 12 writes an amount of movement to the common RAM 24 with every given period, the DSP 25 reads the amount of movement from the RAM 24, calculates current command values for the individual motors, and transmits the values to the servo amplifiers through the serial communication LSI 13, optical modules 14A and 14B, and serial buses.
On the other hand, motor current values, motor position information, etc. are transmitted from the servo amplifiers to the DSP 25 through the serial buses, optical modules 14A and 14B, and serial communication LSI 13.
The serial communication LSI 13 has CH.1 and CH.2 for transmission and reception of serial signals. Electrical signals delivered from CH.1 and CH.2 are subjected to electrical-to-optical conversion by the optical modules 14A and 14B, transmitted to the communication lines #1 and #2, and delivered to the individual servo amplifiers. Further, the feedback signals from the servo amplifiers are transmitted to the optical modules 14A and 14B through the communication lines #1 and #2, and subjected to optical-to-electrical conversion. The converted electrical signals are delivered to the serial communication LSI 13 through CH.1 or CH.2.
FIG. 7 is a block diagram showing an example of a serial communication LSI of the conventional numerical controller.
The serial communication LSI 13 comprises a first communication control circuit 15A and a second communication control circuit 15B for controlling the communication line #1 and the communication line #2, respectively. The communication control circuits 15A and 15B transmit and receive serial data.
Further, the communication control circuits 15A and 15B monitors the states of the communication lines. If the communication lines suffer any failure, the control circuits 15A and 15B detect the occurrence of the failure and notify the CPU of the numerical controller of it. On receiving this notification of the occurrence of the failure, the CPU proceeds to an NMI (non-maskable interrupt) routine, in which it stops the system.
If a system alarm is generated in an external circuit of the serial communication LSI 13, the LSI 13 is internally notified of an alarm state through its system alarm input. Further, the alarm is delivered to alarm inputs of the communication control circuits 15A and 15B. On receiving the alarm, the control circuits 15A and 15B stop communication with the communication lines #1 and #2.
When the communication from the communication control circuits 15A and 15B is stopped, all the servo amplifiers that are connected to the communication lines#1 and #2 detect the communication failure and make the outputs to the servomotors zero, as mentioned before.
If the communication control circuit 15A detects any communication failure on the communication line #1, moreover, it issues a communication alarm and notifies the exterior of the serial communication LSI 13 of it. At the same time, internal circuits (OR circuits 18 and 19) of the LSI 13 notifies the other communication control circuit 15B of the alarm.
In contrast with this, the communication control circuit 15B notifies the exterior of the serial communication LSI 13 of the detected communication alarm on the communication line #2, while the internal circuits (OR circuits 18 and 19) of the LSI 13 notifies the other communication control circuit 15A of the alarm.
This is done because the communication alarm is a cause of system interruption and that the system interruption is a cause of communication interruption.
Described in JP 10-13394A is an example of a numerical controller such that servo amplifiers and the numerical controller are connected by serial buses, through which data for servomotor control are transferred.
If a communication alarm is issued when a communication failure is detected in one communication control circuit, in a system for controlling conventional servomotors, the alarm is also instantly transmitted to the other communication control circuit, whereupon all communication control circuits stop communication.
Also if a system alarm is generated in a system on the numerical controller side, it is instantly transmitted to all the communication control circuits, which then stop communication.
If the communication with the communication lines stops, the servo amplifiers reduce the outputs to the motors to 0, as mentioned before. In the case of the gravity axis, the outputs from the servo amplifiers to the motors are reduced to 0 before the axis braked by control on the system side. In the worst case, therefore, the axis may possibly drop and damage a workpiece or the machine.
If the communication with the communication lines stops, moreover, the outputs from the servo amplifiers to the motors are only reduced to 0, so that necessary axis control processing for safety, such as an emergency stop or retraction, cannot be performed.